package com.zhanghe.study.spring4.annotation.config;

import com.zhanghe.study.spring4.annotation.bean.TestValue;
import org.springframework.context.annotation.*;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * 测试PropertySource引入配置文件
 * @author zh
 * @date 2021/2/21 15:11
 */
// 开启AOP注解
@EnableAspectJAutoProxy
//开启事务管理功能
@EnableTransactionManagement
@PropertySources(
        {
                @PropertySource(value = "classpath:test.properties")
        }
)
@ComponentScan("com.zhanghe.study.spring4.annotation")
@Configuration
public class MainConfig4 {

    @Bean
    public TestValue testValue(){
        return new TestValue();
    }
}
